#pragma once

class Constants
{
    //3.141592653589793
public:
    // pi = π;
    constexpr static double PI                           = 3.1415926535897932384626433832795;
    // PI2 = pi*pi;
    constexpr static double PI2                          = PI * 2;
    // PI_2 = pi*pi;
    constexpr static double PI_2                         = PI / 2.0;

    // 地球赤道半径(千米)[cs_rEar];
    constexpr static double EarthRadius                  = 6378.1366;
    // 地球平均半径[cs_rEarA];
    constexpr static double EarthRadiusAverage           = 0.99834 * EarthRadius;

    // 天文单位长度(千米);
    constexpr static double AU                           = 1.49597870691e8;

    // 地球极赤半径比[cs_ba];
    constexpr static double WGS84_CONSTANT               = 0.99664719;
    // 地球极赤半径比的平方[cs_ba2];
    constexpr static double WGS84_CONSTANT_SQUARE        = WGS84_CONSTANT * WGS84_CONSTANT;
    // sin(太阳视差)[sinP];
    constexpr static double SinSunParallax               = EarthRadius / AU;
    // 太阳视差[PI]// 暂时没法使用;
    // constexpr static double SunParallax           = asin(SinSunParallax);
    // 光速(行米/秒)
    constexpr static double Lightspeed                   = 299792.458;
    // 每天文单位的光行时间(儒略世纪) [cs_Agx];
    constexpr static double AUUnitTime                   = AU / Lightspeed / 86400.0 / 36525.0;

    // 2000 年的儒略数;
    constexpr static double J2000                        = 2451545.0;

    // 每弧度的度数[radd]
    constexpr static double DegreesPerRadian             = 180.0 / PI;
    // 每弧度的角秒数[rad]
    constexpr static double arcSecondsPerRaddian         = DegreesPerRadian * 3600.0;

    // 月亮与地球的半径比(用于半影计算)[cs_k]
    constexpr static double k_Penumbra                   = 0.2725076;
    // 月亮与地球的半径比(用于本影计算)[cs_k2]
    constexpr static double k_Umbral                     = 0.2722810;
    // 太阳与地球的半径比(对应959.64)[cs_k0]
    constexpr static double k0                           = 109.1222;
    // 用于月亮视半径计算 半影[cs_sMoon]
    constexpr static double MoonApparentRadiusPenumbra   = k_Penumbra * EarthRadius * 1.0000036 * arcSecondsPerRaddian;
    // 用于月亮视半径计算 本影[cs_sMoon2]
    constexpr static double MoonApparentRadiusUmbral     = k_Umbral * EarthRadius * 1.0000036 * arcSecondsPerRaddian;
    // 用于太阳视半径计算[cs_sSun]
    constexpr static double SunApparentRadius            = 959.64;
    // 行星会合周期[cs_xxHH];
    constexpr static double PlanetaryConjunctionCycles[] = {116.0, 584.0, 780.0, 399.0, 378.0, 370.0, 367.0, 367.0};



public:
    //std::vector<int>  CalcIndexValue(std::vector<int> array, int CalcItemsCount);
};